package demoMod.invincibleOne.relics;

import com.badlogic.gdx.graphics.Texture;
import com.megacrit.cardcrawl.actions.common.GainEnergyAction;
import com.megacrit.cardcrawl.actions.common.RelicAboveCreatureAction;
import com.megacrit.cardcrawl.characters.AbstractPlayer;
import com.megacrit.cardcrawl.dungeons.AbstractDungeon;
import demoMod.invincibleOne.InvincibleOneMod;

public class SecondWindRelic extends AbstractInvincibleRelic {
    public static final String ID = InvincibleOneMod.makeID("SecondWindRelic");
    public static final Texture IMG = new Texture(InvincibleOneMod.getResourcePath("relics/SecondWindRelic.png"));
    public static final Texture OUTLINE_IMG = new Texture(InvincibleOneMod.getResourcePath("relics/SecondWindRelic.png"));

    public SecondWindRelic() {
        super(ID, IMG, OUTLINE_IMG, RelicTier.SPECIAL, LandingSound.FLAT);
        this.counter = 1;
    }

    @Override
    public String getUpdatedDescription() {
        return DESCRIPTIONS[0];
    }

    @Override
    public void atTurnStart() {
        if (counter <= 0) {
            this.flash();
            this.beginLongPulse();
            AbstractPlayer p = AbstractDungeon.player;
            addToBot(new RelicAboveCreatureAction(p, this));
            addToBot(new GainEnergyAction(1));
        }
    }
}
